package com.study.spark.scala.summer.common

import com.study.spark.scala.summer.controller.WordCountController
import com.study.spark.scala.summer.util.EnvCache

trait TApplication {


  def execute(op : =>Unit): Unit = {
    EnvCache.put("d:/")
    println("开启环境")

    try {
      op
    }catch {
      case e : Exception => e.printStackTrace()
    }
    println("关闭环境")
    EnvCache.clear()
  }
}
